<template>
  <a-modal
    :visible="visible"
    title="新增限额规则"
    okText="新增"
    @cancel="() => { $emit('cancel') }"
    @ok="() => { $emit('create') }"
  >
    <a-form :form="form">
      <a-form-item
        label="月度个人限额"
        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
      >
        <a-input
          v-decorator="[
              'limitAmount',
              {rules: [{ required: true, message: '请输入月度个人限额' }]}
            ]"
          name="limitAmount"
        />
      </a-form-item>
      <a-form-item
        label="限额规则名称"
        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
      >
        <a-input
          v-decorator="[
              'limitName',
              {rules: [{ required: true, message: '请输入限额规则名称' }]}
            ]"
          name="limitName"
        />
      </a-form-item>
    </a-form>
  </a-modal>
</template>
<script>
import {getXbdServers} from '@/api/manage'

export default {
  data(){
    return{
      form: this.form = this.$form.createForm(this)
    }
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  mounted() {
  },
  beforeCreate () {
    // this.form = this.$form.createForm(this, { name: 'form' })
  },
  methods: {

  }
}
</script>
